﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Domain.Model.SubprojectTask>>" %>

    <table>
        <tr>
            <th></th>
            <th>
                Name
            </th>
            <th>
                Description
            </th>
            <th>
                Completed
            </th>
        </tr>

    <% foreach (var task in Model) { %>
    
        <tr>
            <td>
             <% if (Helpers.IsAdmin(this)){%>
                <%: Html.ActionLink("Edit", "EditTask", "Subproject", new { id = task.Id }, null ) %> |
                <%: Html.ActionLink("Delete", "DeleteTask", "Subproject", new { id = task.Id }, null ) %>
             <% } %>
            </td>
            <td>
                <%: task.Name %>
            </td>
            <td>
                <%: task.Description %>
            </td>
            <td align="center">
                <%: task.Completed %>
            </td>
        </tr>
    
    <% } %>

    </table>


